/**
 * 测试用例
 */
const Datas: Record<string, any[]> = {
  uniq: [
    [
      [1, 2, 2, 4, 4, 'a', '1', 'a', null, null],
      [1, 2, 4, 'a', '1', null],
    ],
  ],
  uniqBy: [
    [
      [{ a: 1 }, { a: 1 }, { a: '1' }, { a: 2 }, { a: '2' }, { a: 2 }],
      'a',
      [{ a: 1 }, { a: '1' }, { a: 2 }, { a: '2' }],
    ],
    [
      [{ a: 1 }, { a: 1 }, { a: '1' }, { a: 2 }, { a: '2' }, { a: 2 }],
      (v: any) => v.a >> 0,
      [{ a: 1 }, { a: 2 }],
    ],
  ],
  compact: [
    [
      [0, 1, false, 2, 4, undefined, 'a', '1', '', null],
      [1, 2, 4, 'a', '1'],
    ],
  ],
  first: [
    [[1, 2, 3], 1],
    [['1', 1], '1'],
  ],
  last: [[[1, 2, 3], 3]],
  slice: [
    [[1, 2, 3, 4, 5], 1, [2, 3, 4, 5]],
    [[1, 2, 3, 4, 5], 1, 4, [2, 3, 4]],
  ],
  flat: [
    [
      [1, [2, 3], [4, 5]],
      [1, 2, 3, 4, 5],
    ],
    [
      [1, [2, 3], [4, 5, [6, 7]]],
      [1, 2, 3, 4, 5, [6, 7]],
    ],
    [[1, [2, [3, [4]]]], 2, [1, 2, 3, [4]]],
  ],
  flatDeep: [
    [new Set([1, 1, [2, [1, [3, 4]]]]), [1, 2, 1, 3, 4]],
    [
      [1, [2, [3, [4]]]],
      [1, 2, 3, 4],
    ],
  ],
  fill: [
    [new Array(3), 6, [6, 6, 6]],
    [[1, 2, 3, 4, 5], 'x', 1, 4, [1, 'x', 'x', 'x', 5]],
  ],
  join: [
    [[1, 2, 3, 4], '/', '1/2/3/4'],
    [[1, 2, 3, 4], '1,2,3,4'],
  ],
  concat: [
    [
      [{ name: 'a' }, { name: 'b' }],
      [{ name: 'a' }],
      [{ name: 'a' }, { name: 'b' }, { name: 'a' }],
    ],
    [
      [1, 2, 3],
      [1, 2],
      [1, 2, 3, 1, 2],
    ],
  ],
  except: [
    [[1, 2, 3], [2, 3], [1]],
    [
      [{ name: 'a' }, { name: 'b' }],
      [{ name: 'a' }],
      (v: any) => v.name,
      [{ name: 'b' }],
    ],
    [
      [1, 2, 3],
      [1, '2', 3],
      [2, '3', 1],
      [2, 3, '2', '3'],
    ],
  ],
  union: [
    [
      [1, 2, 3],
      [2, 3],
      [1, 2, 3],
    ],
    [
      [{ name: 'a' }, { name: 'b' }],
      [{ name: 'a' }],
      (v: any) => v.name,
      [{ name: 'a' }, { name: 'b' }],
    ],
  ],
  intersect: [
    [[1, 2, 3], [2, 3], [1, 2], [2]],
    [[1, 2, 3], [3], undefined, [3]],
    [
      [{ name: 'a' }, { name: 'b' }],
      [{ name: 'a' }],
      (v: any) => v.name,
      [{ name: 'a' }],
    ],
  ],
  reverse: [
    [
      [1, 2, 3],
      [3, 2, 1],
    ],
  ],
  tail: [
    [
      [1, 2, 3],
      [2, 3],
    ],
  ],
  initial: [
    [
      [1, 2, 3],
      [1, 2],
    ],
  ],
  take: [
    [[1, 2, 3, 4, 5], 3, [1, 2, 3]],
    [
      [1, 2, 3, 4, 5],
      [1, 2, 3, 4, 5],
    ],
  ],
  takeRight: [[[1, 2, 3, 4, 5], 3, [3, 4, 5]]],
  range: [
    [5, [0, 1, 2, 3, 4]],
    [0, -5, 0.5, [0, -0.5, -1, -1.5, -2, -2.5, -3, -3.5, -4, -4.5]],
    [-5, 1, [-5, -4, -3, -2, -1, 0]],
  ],
  findIndex: [
    [['a', 'b', 'c', 1, 3, 6], (v: any) => typeof v === 'number', 3],
    [[{ a: 1 }, { a: 2 }, { a: 3 }], 'a', 0],
    [[{ a: 1 }, { a: 2 }, { a: 3 }], { a: 3 }, 2],
  ],
  findLastIndex: [
    [['a', 'b', 'c', 1, 3, 6], (v: any) => typeof v === 'number', 5],
    [[{ a: 1 }, { a: 2 }, { a: 3 }], 'a', 2],
  ],
  insert: [[[3, 4], 0, 1, 2, [1, 2, 3, 4]]],
  append: [[[1, 2], 3, 4, [1, 2, 3, 4]]],
  remove: [[[{ a: 1 }, { a: 2 }, { a: 3 }], { a: 3 }, [{ a: 3 }]]],
  without: [[[1, 2, 3, 4, 3, 2, 1], 2, 3, 4, [1, 1]]],
  pull: [[[1, 2, 3, 4, 3, 2, 1], 2, 3, 4, [1, 1]]],
  pop: [[[1, 2, 3], 3]],
  chunk: [
    [
      [1, 2, 3, 4],
      2,
      [
        [1, 2],
        [3, 4],
      ],
    ],
    [[1, 2, 3, 4], 3, [[1, 2, 3], [4]]],
  ],
  zip: [
    [
      [1, 2],
      ['a', 'b', 'c'],
      [
        [1, 'a'],
        [2, 'b'],
        [undefined, 'c'],
      ],
    ],
    [
      ['a', 'b', 'c'],
      [1, 2],
      ['1'],
      [
        ['a', 1, '1'],
        ['b', 2, undefined],
        ['c', undefined, undefined],
      ],
    ],
  ],
  unzip: [
    [
      [
        [1, 'a'],
        [2, 'b'],
        [undefined, 'c'],
      ],
      [
        [1, 2, undefined],
        ['a', 'b', 'c'],
      ],
    ],
  ],
  zipObject: [[['a', 'b'], [1, 2, 3], { a: 1, b: 2 }]],
  sortedIndex: [
    [[1, 2, 3], 1.5, 1],
    [['a', 'c'], 'b', 1],
    [[{ a: 1 }, { a: 2 }, { a: 3 }], { a: 2.5 }, 0],
  ],
  sortedIndexBy: [[[{ a: 1 }, { a: 2 }, { a: 3 }], { a: 2.5 }, 'a', 2]],
}

export default Datas
